#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time      :2022/6/2 14:55
# @Author    :cjw
import allure
from appium.webdriver.common.appiumby import AppiumBy

from app_wework.base.base_page import BasePage
from app_wework.util.log import logger


class ContactListPage(BasePage):
	"""通讯录页面"""

	__BTN_ADD_MEMBER = (AppiumBy.XPATH, '//*[@text="添加成员"]')  # 添加成员

	def goto_add_member(self):
		"""跳转到添加成员"""
		from app_wework.page.add_member_page import AddMemberPage

		with allure.step(msg := '点击“添加成员”菜单，跳转添加成员页面'):
			logger.info(msg)
			self.swipe_find_click(self.__BTN_ADD_MEMBER)
		return AddMemberPage(self.driver)
